<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript">
			window.onload=function(){
				function fun(n,m){
				var va1=document.getElementById(n);
				var va2=document.getElementById(m);
					
				var va3=va1.cloneNode(true);
				var va4=va2.cloneNode(true);
				
				var f1=va1.parentNode;
				var f2=va2.parentNode;
				
				f1.replaceChild(va4,va1);
				f2.replaceChild(va3,va2);
				}
				var but=document.getElementById("but")
				but.onclick=function(){
					
					fun("game","city");
				}
				
			}
		</script>
	</head>
	<body>
		<p>你喜欢哪个城市?</p>
		<ul id="city">
			<li id="bj" name="BeiJing">北京</li>
			<li>上海</li>
			<li>东京</li>
			<li>首尔</li>
		</ul>
		<p>你喜欢哪款单机游戏?</p>
		<ul id="game">
			<li id="rl">红警</li>
			<li>实况</li>
			<li>极品飞车</li>
			<li>魔兽</li>
		</ul>
		<br /><br />
		gender:
			<input type="radio" name="gender" value="male"/>
			<input type="radio" name="gender" value="famle"/>
			<button id="but">互换</button>
	</body>
</html>
